package TestDemo1;

/**
 * Created with IntelliJ IDEA
 * Description:实现runable接口
 * User:恋恋
 * Date:2024-12-05
 * Time:11:15
 */
class MyRunnable implements Runnable{
    @Override
    public void run() {
        System.out.println("实现runnable接口");
    }
}
public class test {
    public static void main(String[] args) {
        //这只是描述了一个任务
        Runnable R = new MyRunnable();
        //把任务交给线程来解决
        Thread t = new Thread(R);
        t.start();
    }
}
